                                   PinDir

                  by Gert-Jan de Vos (devos@eb.ele.tue.nl)

                                  May 1995


PinDir is a utility that can be used to restore all files in PinFilter:Temp
to the backdrop after a reboot - without it files can often get left there,
forgotten, and using up precious hard disc space.

PinDir pins all files in a given directory on the pinboard. It starts at the
bottom left and places the icons from left to right in rows upwards.

Alternatively with the '-' flag, it starts at the top and fills rows downwards:

  Syntax: *PinDir [+|-] <directory> [<pinfile>]

  Pins all files in the given directory on the PinBoard
  + pins icons from the icon bar upwards (default)
  - pins icons from top of screen downwards
  Coordinates from entries in pinfile are used in preference.

PinDir can use a hidden feature of RISC OS to 'remember' the position of the
icons on the pinboard. When the system variable SaveDesk$File is defined with
a valid filename, this file will be used to write the desktop state on
shutdown. So when you call <SaveDesk$File> from your !Boot sequence, the
computer will restart to a state similar to how you shut it down previously.
Among all this mess in the shutdown state file are also the files saved to
the PinFilter:Temp directory. By giving this file as the last parameter to
PinDir, it will try to recover the Pinboard coordinates of the icons from
this, without running the other commands in the file.

This is the part of my Desktop boot script which uses PinDir:

  Set SaveDesk$File Boot:LastState

  | [..Other stuff removed..]

  Set Boot$Dummy 1
  RMEnsure TaskFilters 0 Set Boot$Dummy 0
  If Boot$Dummy=1 Then Run Boot:Utils.PinDir + PinFilter:Temp <SaveDesk$File>
  Unset Boot$Dummy

--
Gert-Jan de Vos
Benedenbeekloop 18
5662 HL Geldrop
the Netherlands
+31 40-2858590
devos@eb.ele.tue.nl
